use "bank_firm_data.dta", clear

*************************
* Table 7
*************************

reghdfe d_credit c.spread_lag##c.ts_lag, absorb(firmyear bankquarter) cluster(firmbank)
reghdfe d_credit c.spread_lag##c.industryts_lag, absorb(firmyear bankquarter) cluster(firmbank)
reghdfe d_credit c.spread_lag##c.ts_inflated_lag, absorb(firmyear bankquarter) cluster(firmbank)
reghdfe d_credit c.spread_lag##c.ts_lag##c.interbank_lag, absorb(firmquarter bankquarter) cluster(firmbank)
reghdfe d_credit c.spread_lag##c.ts_lag##c.netforeignassets_lag, absorb(firmquarter bankquarter) cluster(firmbank)

*************************
* Table 8
*************************

reghdfe d_credit c.spread_lag##c.ts_lag c.spread_lag##c.equity_lag, absorb(firmyear bankquarter) cluster(firmbank)
reghdfe d_credit c.spread_lag##c.ts_lag c.spread_lag##c.equity_lag c.spread_lag##c.roa_lag, absorb(firmyear bankquarter) cluster(firmbank)
reghdfe d_credit c.spread_lag##c.ts_lag c.spread_lag##c.equity_lag c.spread_lag##c.roa_lag c.spread_lag##c.size_lag, absorb(firmyear bankquarter) cluster(firmbank)
reghdfe d_credit c.spread_lag##c.ts_lag if year!=2009 & year!=2010, absorb(firmyear bankquarter) cluster(firmbank)
reghdfe d_credit c.spread_lag##c.ts_2008, absorb(firmyear bankquarter) cluster(firmbank)

